<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>v-show</title>
	</head>
	<body>
		
		<div id='app'>
			<input type="button" value="切换" @click="changeIsShow">
			<input type="button" value="累加" @click="addAge">
			<img v-show="isShow" src="./images/00.JPG" alt="">
			<img v-show="age>=18" src="./images/00.JPG" alt="">
		</div>
		
		 <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
		<script>	 
		var vm = new Vue({
				 el: "#app",
				 data:{
					 isShow:false,
					 age:16
				 },
				 methods:{
					 changeIsShow:function(){
						 this.isShow=!this.isShow;
					 },
					 addAge:function(){
						 this.age++;
					 }
				 },
			 })
	    
		
		 </script>
	</body>
</html>